﻿using Dapper;
using System;
using BCEntity.TMS.VehicleBusinessMapping;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.VehicleBusinessMapping
{
	/// <summary>
	/// 车辆与业务配置
	/// </summary>
	public interface IVehicleBusinessMappingData
	{
		#region  成员方法
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		/// <param name="vehicleBusinessMappingId">车辆与业务配置Id</param>
		Task<bool> Exists(int vehicleBusinessMappingId);
		/// <summary>
		/// 增加车辆与业务配置
		/// </summary>
		/// <param name="entity">车辆与业务配置信息</param>
		Task<VehicleBusinessMappingEntity> Add(VehicleBusinessMappingEntity entity);
		/// <summary>
		/// 更新车辆与业务配置
		/// </summary>
		/// <param name="entity">车辆与业务配置信息</param>
		Task<VehicleBusinessMappingEntity> Update(VehicleBusinessMappingEntity entity);
		/// <summary>
		/// 删除车辆与业务配置
		/// </summary>
		/// <param name="vehicleBusinessMappingId">车辆与业务配置Id</param>
		Task<bool> Delete(int vehicleBusinessMappingId);
		/// <summary>
		/// 获取车辆与业务配置
		/// </summary>
		/// <param name="vehicleBusinessMappingId">车辆与业务配置Id</param>
		Task<VehicleBusinessMappingEntity> GetEntity(int vehicleBusinessMappingId);
		/// <summary>
		/// 获取车辆与业务配置列表
		/// </summary>
		Task<IEnumerable<VehicleBusinessMappingEntity>> GetList();
		/// <summary>
		/// 获取车辆与业务配置分页列表
		/// </summary>
		/// <param name="vehicleTransportBusinessConfigId">车辆运输业务配置Id</param>
		/// <param name="vehicleTypeId">车型Id</param>
		/// <param name="enabled">启用</param>
		/// <param name="start">开始时间</param>
		/// <param name="end">结束时间</param>
		/// <param name="sortName">排序字段</param>
		/// <param name="ascending">升序</param>
		/// <param name="pageIndex">当前页码</param>
		/// <param name="pageSize">每页数据条数</param>
		Task<(IEnumerable<VehicleBusinessMappingEntity>, int)> Query(int? vehicleTransportBusinessConfigId,int? vehicleTypeId, bool? enabled, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
		/// <summary>
		/// 启用车辆与业务配置
		/// </summary>
		/// <param name="vehicleBusinessMappingId">车辆与业务配置Id</param>
		/// <param name="adminId">员工Id</param>
		/// <param name="fullname">员工姓名</param>
		Task<bool> Enabled(int vehicleBusinessMappingId, long adminId, string fullname);
		/// <summary>
		/// 禁用车辆与业务配置
		/// </summary>
		/// <param name="vehicleBusinessMappingId">车辆与业务配置Id</param>
		/// <param name="adminId">员工Id</param>
		/// <param name="fullname">员工姓名</param>
		Task<bool> Disabled(int vehicleBusinessMappingId, long adminId, string fullname);
		#endregion  成员方法
		#region 获取司机端所用车辆列表

		/// <summary>
		/// 获取车辆与业务配置列表
		/// </summary>
		Task<IEnumerable<VehicleBusinessMappingForAppEntity>> GetListForApp();
		#endregion
	}


}